feat: add X-Glean headers for experimental features and deprecation testing#66
Merged
travis-hoover-glean merged 1 commit intomainfrom Jan 22, 2026
Merged
Conversation
…esting Add XGlean beforeRequest hook that sets X-Glean-Exclude-Deprecated-After and X-Glean-Experimental headers based on SDK options or environment variables. - Add `excludeDeprecatedAfter` and `includeExperimental` SDK builder options - Add environment variable support: X_GLEAN_EXCLUDE_DEPRECATED_AFTER and X_GLEAN_INCLUDE_EXPERIMENTAL - Environment variables take precedence over SDK options - Add comprehensive test coverage for all scenarios - Add documentation in README
chris-freeman-glean
approved these changes
Jan 22, 2026
chris-freeman-glean
added a commit
that referenced
this pull request
Feb 3, 2026
The custom fields added to SDKConfiguration in #66 are removed when Speakeasy regenerates the SDK, breaking the build. This moves the configuration to a dedicated GleanCustomConfig singleton in the preserved hooks/ package. Changes: - Add GleanCustomConfig singleton for custom configuration storage - Add GleanBuilder wrapper with excludeDeprecatedAfter/includeExperimental methods - Update XGleanHeadersHook to read from GleanCustomConfig instead of SDKConfiguration - Update tests to use GleanCustomConfig - Update README to document GleanBuilder usage
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
XGleanHeadersHookbeforeRequest hook that setsX-Glean-Exclude-Deprecated-AfterandX-Glean-ExperimentalheadersexcludeDeprecatedAfterandincludeExperimentalwith corresponding environment variable supportThis is the Java SDK equivalent of gleanwork/api-client-typescript#95
Test plan